<template>
  <div id="app">
    <blog-nav></blog-nav>
    <router-view class="router-view" />
    <foot></foot>
  </div>
</template>

<script type="text/ecmascript-6">
import BlogNav from "base/nav";
import Foot from "base/foot";
export default {
  name: "App",
  created() {
    if (this.webUtil.getQueryString("from")) {
      this.statistics();
    }
  },
  methods: {
    // 流量统计
    statistics() {
      this.$http.post(this.domain + "/statistics", {
        namespace: window.location.hostname,
        subject: "index",
        from: this.webUtil.getQueryString("from"),
        v_time: Date.now()
      });
    }
  },
  components: {
    BlogNav,
    Foot
  }
};
</script>

<style>
.router-view {
  min-height: calc(100vh - 111px);
}
</style>
